//
//  CMDBHomeRelatedTableVIew.swift
//  CMDB
//
//  Created by 曹桂祥 on 2017/5/5.
//  Copyright © 2017年 CMDB. All rights reserved.
//

import UIKit

private let CMDBHomeRelatedCellID = "CMDBHomeRelatedCellID"


class CMDBHomeRelatedTableView: CMDBRefreshTableView {
    
    var controller : UIViewController?
    
    override func setupTableView() {
        super.setupTableView()
        
        self.registerClass(CMDBHomeReleatedPeopleCell.self, forCellReuseIdentifier:CMDBHomeRelatedCellID)
        
    }
    
    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return tableViewdataArray!.count
    }
    
    
    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        
//        let cell = tableView.dequeueReusableCellWithIdentifier(CMDBHomeRelatedCellID) as! CMDBHomeReleatedPeopleCell
//        
//        return cell
        return dequeCellAndLoadContentFromAdapter(tableViewAdapterArray![indexPath.row] , indexPath: indexPath, tableView: self, controller: self.controller,cellReuseIdentifier : CMDBHomeRelatedCellID)
        
    }
    
    override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
        
//        let viewModel = tableViewdataArray![indexPath.row] as! CMDB.CMDBPublicNoticeBean
//
//        return viewModel.cellHeight
        
        return 71
    }
    


}
